package at.fhooe.engine.visuals;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.geom.Point2D;

public class LineVisual implements Visual {

	private Color m_color;
	private Point2D m_p1;
	private Point2D m_p2;
	
	public LineVisual(Color color, Point2D p1, Point2D p2){
		m_color = color;
		m_p1 = p1;
		m_p2 = p2;
	}

	public void draw(Graphics2D graphics) {
		graphics.setColor(m_color);
		graphics.drawLine((int)m_p1.getX(), (int)m_p1.getY(), (int)m_p2.getX(), (int)m_p2.getY());
	}

}